package com.quanyan.place.enums;

import com.quanyan.common.enums.BaseEnum;

/**
 * 搜索排序规则
 */
public enum  SortTypeEnum implements BaseEnum {

    INTELLIGENT_ORDERING(1, "INTELLIGENT_ORDERING", "智能排序规则", true),
    NEAREST_TO_ME(2, "NEAREST_TO_ME", "离我最近排序规则", false),
    LOWEST_PRICE(3, "LOWEST_PRICE", "价格最低排序规则", false),
    HIGHEST_POPULARITY(4, "HIGHEST_POPULARITY", "人气最高排序规则", false),
    HISTORY_ORDERS(5, "HISTORY_ORDERS", "历史订单", false);


    protected int id;

    protected String code;

    protected String label;

    protected boolean success;

    SortTypeEnum(int id, String code, String label, boolean success) {
        this.id = id;
        this.code = code;
        this.label = label;
        this.success = success;
    }

    @Override
    public boolean isSuccess() {
        return success;
    }

    @Override
    public int getId() {
        return id;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getLabel() {
        return label;
    }
}
